package com.jinly.ryder.deploy.web.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jinly.ryder.common.auth.annotation.Username;
import com.jinly.ryder.deploy.service.model.DeployType;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 部署实例记录
 */
@Data
public class DeployRecordVO {

    private Long id;

    /**
     * 发布，重启
     */
    private DeployType deployType;

    /**
     * 主机
     */
    private String host;

    /**
     * 端口
     */
    private Integer port;

    /**
     * 部署申请ID
     */
    private Integer applyId;

    /**
     * 实例ID
     */
    private Integer instanceId;

    /**
     * 部署结果
     */
    private Boolean success;

    /**
     * 消息
     */
    private String msgText;

    /**
     * 部署开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime beginTime;

    /**
     * 部署结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 操作人
     */
    private Long operator;


    @Username("operator")
    private String operatorName;

}
